import request from '../request.js'

const Api_wallet = {
	//钱包列表
	wallet: function(data) {
		return request({
			url: '/user/wallet',
			method: 'GET',
			data:data
		})
	},
	//钱包支付
	walletPay: function(data) {
		return request({
			url: '/user/wallet/pay',
			method: 'POST',
			data:data
		})
	},
	//钱包开户
	walletOpen: function(data) {
		return request({
			url: '/user/wallet/open',
			method: 'POST',
			data:data
		})
	},
	//查询开户状态
	walletSearch: function(data) {
		return request({
			url: '/user/wallet/search',
			method: 'GET',
			data:data
		})
	},
	//查询钱包余额
	walletBalance: function(data) {
		return request({
			url: '/user/wallet/balance',
			method: 'GET',
			data:data
		})
	},
	//钱包管理
	walletManage: function(data) {
		return request({
			url: '/user/wallet/manage',
			method: 'GET',
			data:data
		})
	},
	//我的订单
	order: function(data) {
		return request({
			url: '/order',
			method: 'GET',
			data:data
		})
	},
	//卖出记录 
	orderSells: function(data) {
		return request({
			url: '/order/sells',
			method: 'GET',
			data:data
		})
	},
	//创建订单
	orderBuy: function(data) {
		return request({
			url: '/order/buy',
			method: 'POST',
			data:data,
			showLoading:true
		})
	},
	//支付
	orderPay: function(data) {
		return request({
			url: '/order/pay',
			method: 'POST',
			data:data,
			showLoading:true
		})
	},
	//支付完成
	orderPaid: function(data) {
		return request({
			url: '/order/paid',
			method: 'POST',
			data:data
		})
	},
	//取消支付
	orderCancel: function(data) {
		return request({
			url: '/order/cancel',
			method: 'POST',
			data:data
		})
	},
	//订单查询
	orderShow: function(data) {
		return request({
			url: '/order/show',
			method: 'GET',
			data:data
		})
	},
	//快速购买
	buyQuickly: function(data) {
		return request({
			url: '/order/buy/quickly',
			method: 'POST',
			data:data
		})
	},
	//购买一个
	buyOne: function(data) {
		return request({
			url: '/order/buy/one',
			method: 'POST',
			data:data
		})
	},
	//购买盲盒
	buyBox: function(data) {
		return request({
			url: '/order/buy/box',
			method: 'POST',
			data:data
		})
	}
}
export default Api_wallet
